
	
export const links = {
	methods: {
		// 根据类型跳转相应页面
		jumpByPageType(urlObj) {
			let url = '';
			switch(urlObj.type){
				case 'detail': 
					this.pushPage('/pages/goods/GoodsDetail', urlObj.query); 
				break;
				case 'category': 
					this.pushPage('/pages/goods/GoodsList', urlObj.query); 
				break;
				case 'topic': 
					this.pushPage('/pages/topic/index', urlObj.query); 
				break;
				case 'none': 
				default: break;
			}
		},
		// 使用push方式跳转
		pushPage(url, query = {}) {
			this.$Router.push({
				path: url,
				query: query
			});
		},
	}
};
